// eduData/eduDatacom/column/column.js
Component({ 
  /**
   * 组件的属性列表
   */
  properties: {
   title:{
     type:String,
     value:'分类'
   },
   dataArray:{
     type:Array,
    //  value:['教材','试题试卷','知识点','小升初' ,'中考','高考','大学' ,'其他']
    value:[
      {
        title:'教材',
        id:'jiaocai'
      },
      {
        title: '试题试卷',
        id: 'shiti'
      },
      {
        title: '知识点',
        id: 'zhishidian'
      },
      {
        title: '小升初',
        id: 'xiaoshenchu'
      },
      {
        title: '中考',
        id: 'zhongkao'
      },
      {
        title: '高考',
        id: 'gaokao'
      },
      {
        title: '大学',
        id: 'daxue'
      },
      {
        title: '其他',
        id: 'qita'
      },
      ]
   }
  },

  /**
   * 组件的初始数据
   */
  data: {
      screenHeight:100,
      ChioceId:'jiaocai'
  },
  attached:function(e)
  { 
    var that=this
     wx.getSystemInfo({
       success: function(res) {
         var height=res.screenHeight
         that.setData({
           screenHeight:height-110
         })
         //console.log(that.data.screenHeight)
       },
     })

  },
  /**
   * 组件的方法列表
   */
  methods: {
   xuanze:function(event)
   {
     var id=event.target.id;
     this.setData({
       ChioceId:id
     })
     this.triggerEvent('chioce',{id})
   }
  }
})
